package com.fr.data.impl;

import com.fr.base.XMLable;
import com.fr.base.core.ComparatorUtils;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;
import com.fr.data.Dictionary;
import com.fr.data.core.DataXMLUtils;
import com.fr.report.io.xml.ReportXMLUtils;
import java.io.Serializable;

public class TreeNodeAttr
  implements XMLable, Serializable
{
  public static final String XML_TAG = "TreeNodeAttr";
  private Dictionary dict;

  public void setDictionary(Dictionary paramDictionary)
  {
    this.dict = paramDictionary;
  }

  public Dictionary getDictionary()
  {
    return this.dict;
  }

  public String[] dependence()
  {
    return this.dict.getDependence();
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if (paramXMLableReader.isChildNode())
    {
      String str = paramXMLableReader.getTagName();
      if ((str.equals("Dictionary")) || (str.equals("MVList")))
        this.dict = DataXMLUtils.readXMLDictionary(paramXMLableReader);
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    if (this.dict != null)
      ReportXMLUtils.writeXMLable(paramXMLPrintWriter, this.dict, "Dictionary");
  }

  public boolean equals(Object paramObject)
  {
    return ((paramObject instanceof TreeNodeAttr) && (ComparatorUtils.equals(this.dict, ((TreeNodeAttr)paramObject).dict)));
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    TreeNodeAttr localTreeNodeAttr = (TreeNodeAttr)super.clone();
    if (this.dict != null)
      localTreeNodeAttr.dict = this.dict;
    return localTreeNodeAttr;
  }
}